package com.zretc.controller;

import com.zretc.entity.OpLog;
import com.zretc.service.OpLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 周文涛
 * 操作日志api
 */
@RestController
@RequestMapping("system/log")
public class OpLogController {

    @Autowired
    private OpLogService opLogService;

    // 查询
    @GetMapping("/")
    public List<Map<String, Object>> getAll(String startTime,
                                            String endTime){
        HashMap<String, String> stringStringHashMap = new HashMap<>();
        stringStringHashMap.put("startTime",startTime);
        stringStringHashMap.put("endTime",endTime);
        return opLogService.getAll(stringStringHashMap);
    }
}
